﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site2.Master" AutoEventWireup="true" CodeBehind="Ordersforuser.aspx.cs" Inherits="WebApp.Ordersforuser" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
<script language="javascript" type="text/javascript">
    function validateForm() {
        if (document.getElementById("<%=txtname.ClientID%>").value == "") {
            alert("Name cannot be blank ^^~♥ !");
            document.getElementById("<%=txtname.ClientID%>").focus();
            return false;
        }
        if (document.getElementById("<%=txtaddress.ClientID%>").value == "") {
            alert("Address cannot be blank ^^~♥  !");
            document.getElementById("<%=txtaddress.ClientID%>").focus();
            return false;
        }
        if (document.getElementById("<%=txtphone.ClientID%>").value == "") {
            alert("Phone cannot be blank ^^~♥  !");
            document.getElementById("<%=txtphone.ClientID%>").focus();
            return false;
        }
        if (document.getElementById("<%=txtweight.ClientID%>").value == "") {
            alert("Weight(kg) cannot be blank ^^~♥  !");
            document.getElementById("<%=txtweight.ClientID%>").focus();
            return false;
        }
        if (document.getElementById("<%=txtstatus.ClientID%>").value == "") {
            alert("Status cannot be blank ^^~♥  !");
            document.getElementById("<%=txtstatus.ClientID%>").focus();
            return false;
        }
       
        return true;
    }
    </script>
    <table style="width:100%;">
        <tr>
            <td style="width: 212px">
                Customer ID</td>
            <td>
                <asp:Label ID="lblcusid" runat="server" Text="Label"></asp:Label>
            </td>
        </tr>
        <tr>
            <td style="width: 212px">
                Receiver name</td>
            <td>
                <asp:TextBox ID="txtname" runat="server" Width="400px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td style="width: 212px">
                Receiver address</td>
            <td>
                <asp:TextBox ID="txtaddress" runat="server" Width="400px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td style="width: 212px">
                Receiver Phone</td>
            <td>
                <asp:TextBox ID="txtphone" runat="server" Width="400px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td style="width: 212px">
                Weight (kg)</td>
            <td>
                <asp:TextBox ID="txtweight" runat="server" Width="400px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td style="width: 212px">
                Province ID</td>
            <td>
                <asp:DropDownList ID="DropDownList1" runat="server" Width="300px">
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td style="width: 212px">
                Service ID</td>
            <td>
                <asp:DropDownList ID="DropDownList2" runat="server" Width="300px">
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td style="width: 212px">
                Status</td>
            <td>
                <asp:TextBox ID="txtstatus" runat="server" Width="400px"></asp:TextBox>
&nbsp;</td>
        </tr>
        <tr>
            <td style="width: 212px">
                &nbsp;</td>
            <td>
                (Note: Who will pay the bill ? Just write Sender or Receiver)</td>
        </tr>
        <tr>
            <td style="width: 212px">
                &nbsp;</td>
            <td>
                Warning: All fields cannot be blank.
            </td>
        </tr>
        <tr>
            <td style="width: 212px">
                &nbsp;</td>
            <td>
                <asp:Button ID="btnSubmit" runat="server" Text="Submit" 
                    OnClientClick="return validateForm();" onclick="btnSubmit_Click"/>
                <asp:Button ID="btnreset" runat="server" Text="Reset" />
                <asp:Button ID="btncancel" runat="server" Text="Cancel" />
            </td>
        </tr>
    </table>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
</asp:Content>
